﻿Public Class frmCalendarioFeriados
    Private contar As Integer = 0
    Private Sub mcFeriados_DateSelected(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles mcFeriados.DateSelected
        Dim dia As Date
        Dim i As Integer
        Dim bBorrar As Boolean = False
        dia = mcFeriados.SelectionRange.End
        contar = contar + 1
        If contar > 1 Then
            For i = 0 To mcFeriados.BoldedDates.GetLength(0) - 1
                If mcFeriados.BoldedDates(i) = dia Then
                    mcFeriados.RemoveBoldedDate(dia)
                    Exit For
                Else
                    mcFeriados.AddBoldedDate(dia)
                End If
            Next
        Else
            mcFeriados.AddBoldedDate(dia)
        End If
        mcFeriados.UpdateBoldedDates()
    End Sub

    Private Sub cmdGrabar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGrabar.Click
        MsgBox("Las fechas seleccionadas han sido guardadas", MsgBoxStyle.Information, "VarTools")
    End Sub
End Class